program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
   Dinamic : array of Integer;
   I, N : Integer;

function MAX(A, B : Integer) : Integer;
begin
  if(A > B) then
      MAX := A
  else
      MAX := B;
end;

begin
  read(N);
  SetLength(Dinamic, N + 2);
  Dinamic[0] := 0;
  Dinamic[1] := 1;
  Dinamic[2] := 2;
  For I := 3 to N do
      Dinamic[I] := MAX(Dinamic[I - 2], Dinamic[I - 3] + I);
  Dinamic[N + 1] := MAX(dinamic[N - 2], Dinamic[N - 3]);
  write(Dinamic[N]);
  readln;
  Readln;
  Readln;


end.
